package svc

import (
	"hema-fresh-api/api/internal/config"
	"hema-fresh-api/hema/hemaclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	HemaRpc hemaclient.Hema
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		HemaRpc: hemaclient.NewHema(zrpc.MustNewClient(c.HemaRpc)),
	}
}
